﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Unity.Configuration;

namespace IntelsiWeb
{
    public abstract class BasePage<T> : Page where T : class
    {
        protected override void OnInit(EventArgs e)
        {

            Injectar();
            base.OnInit(e);
        }




        

        protected void Injectar()
        {
            using (IUnityContainer container = new UnityContainer())
            {
                container.LoadConfiguration();
                container.BuildUp(this.GetType(), this);
            }
        }
    }
}